<div class="row-fluid first-row">
    <% for(var i = offset; i < limit+offset  && i < posts.length; i++) { %>
    <div class="span<%var span; span = Math.floor(12/(limit/rows)); print(span); %><% if (i === 0) {%> first<% } %>">

        <% if (posts[i].po1_campaign_type === 'Tweet') { %>
        <a href="<%= posts[i].po1_campaign_tw_url %>" target="_blank" class="article-teaser">
            <div class="article-teaser-body article-tweet">
                <h3 class="article-tweet-header"><span class="ss-icon ss-social ss-social-circle">&#xF611;</span> Tweet Tweet</h3>
                <blockquote class="article-tweet-text"><%= posts[i].po1_campaign_tw_text %></blockquote>
                <cite class="article-tweet-user">@<%= posts[i].po1_campaign_tw_user %></cite>
            </div>
        </a>
        <% } else if (posts[i].po1_campaign_type === 'SMS') { %>
        <div class="article-teaser">
            <div class="article-teaser-body article-tweet">
                <h3 class="article-tweet-header">SMS</h3>
                <blockquote class="article-tweet-text"><%= posts[i].po1_campaign_sms_text %></blockquote>
                <cite class="article-tweet-user"><%= posts[i].po1_campaign_sms_user %></cite>
            </div>
        </div>
        <% } else { %>
        <a href="#/campaign/<%= posts[i].url_title %>" class="article-teaser">
            <div class="article-teaser-body">

                <% if (posts[i].po1_campaign_type === 'Video') { %>
                <div class="article-image"  style="background-image: url('http://img.youtube.com/vi/<%= posts[i].po1_campaign_yt %>/hqdefault.jpg');"></div>
                <% } else { %>
                <div class="article-image"  style="background-image: url('<%= posts[i].photo_url %>/@zx_340@zy_220');"></div>
                <% } %>
                <div class="article-info">
                    <h3 class="article-title"><%= posts[i].title %></h3>
                    <div class="article-details">
                        <div class="article-summary">
                            <%= posts[i].po1_campaign_summary %>
                        </div>
                        <div class="article-timestamp">
                            Posted on <% var date = moment(parseInt(posts[i].entry_date)).format('MM/DD/YY'); print(date); %><% if (posts[i].author) {%>  by <%= posts[i].author %><% } %>
                        </div>
                    </div>
                </div>

            </div>
        </a>

        <% } %>

    </div>
    <% if ((i+1)%(limit/rows) === 0 && i+1 !== posts.length) { %>
</div><div class="row-fluid">
    <% } %>
    <% } %>
</div>